package com.china08.yxyapi.repository.mg;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import com.china08.yxyapi.entity.mg.paper.Paper;

/**
 * The Class TestPaper.
 */
public interface PaperRepository extends MongoRepository<Paper, String> {

    Paper findById(String paperId);

    Page<Paper> findByStatusAndUserIdAndSchoolId(Integer status, String userId, String schoolId, Pageable pageable);

    Page<Paper> findByStatusAndPhaseIdAndUserIdAndSchoolId(Integer status, String phaseId, String userId,
            String schoolId, Pageable pageable);

    Page<Paper> findByStatusAndPhaseIdAndSubjectIdAndUserIdAndSchoolId(Integer status, String phaseId, String subjectId,
            String userId, String schoolId, Pageable pageable);
}
